<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>显示模式-转换</title>
    <style>
        /* 块级元素 */
        div {
            width: 100px;
            height: 100px;

            /* 转换成行内块 */
            display: inline-block;
        }

        .div1 {
            background-color: red;
        }

        .div2 {
            background-color: orange;
        }

        /* 行内元素 */
        span{
            width: 200px;
            height: 200px;

            /* 转换成块级 */
            display: block;
        }

        .span1 {
            background-color: red;
        }

        .span2 {
            background-color: orange;
        }

        /* 行内块元素 */
        img {
            width: 100px;
            height: 100px;

            /* 转换成行内不成功 */
            /* display: inline; */
            /* 转换成块级成功 */
            display: block;
        }
    </style>
</head>
<body>
    <!-- 块元素 -->
    <div class="div1">div标签1</div>
    <div class="div2">div标签2</div>

    <!-- 行内元素 -->
    <span class="span1">span1</span>
    <span class="span2">span2</span>


    <!-- 行内块元素 -->
    <img class="img1" src="./images/1.png"  alt="">
    <img class="img2" src="./images/1.png"  alt="">
    
</body>
</html>